<template name="databaseDumpRestore">
    {{> pageHeading title=getPageHeading }}

    {{#if isConnected}}
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-6">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>Mongodump</h5>

                            <div class="ibox-tools">
                                <a id="btnClearMongodumpLogs" href="#" title="{{_ "delete_logs"}}">
                                    <i class="fa fa-trash"></i>
                                </a>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <form method="get" class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-lg-2 control-label">{{_ "arguments"}}</label>
                                    <div class="col-lg-10">
                                        <select id="cmbMongodumpArgs"
                                                data-placeholder="{{_ "select_options"}}"
                                                multiple="true"
                                                class="chosen-select form-control"
                                                tabindex="-1">
                                            <option value="-v">verbose</option>
                                            <option value="--quiet">quiet</option>
                                            <option value="--host">host</option>
                                            <option value="--port">port</option>
                                            <option value="--ipv6">ipv6</option>
                                            <option value="--ssl">ssl</option>
                                            <option value="--sslCAFile">sslCAFile</option>
                                            <option value="--sslPEMKeyFile">sslPEMKeyFile</option>
                                            <option value="--sslPEMKeyPassword">sslPEMKeyPassword</option>
                                            <option value="--sslCRLFile">sslCRLFile</option>
                                            <option value="--sslAllowInvalidCertificates">
                                                sslAllowInvalidCertificates
                                            </option>
                                            <option value="--sslAllowInvalidHostnames">
                                                sslAllowInvalidHostnames
                                            </option>
                                            <option value="--sslFIPSMode">sslFIPSMode</option>
                                            <option value="--username">username</option>
                                            <option value="--password">password</option>
                                            <option value="--authenticationDatabase">
                                                authenticationDatabase
                                            </option>
                                            <option value="--authenticationMechanism">
                                                authenticationMechanism
                                            </option>
                                            <option value="--gssapiServiceName">gssapiServiceName</option>
                                            <option value="--gssapiHostName">gssapiHostName</option>
                                            <option value="--db">db</option>
                                            <option value="--collection">collection</option>
                                            <option value="--query">query</option>
                                            <option value="--queryFile">queryFile</option>
                                            <option value="--readPreference">readPreference</option>
                                            <option value="--forceTableScan">forceTableScan</option>
                                            <option value="--gzip">gzip</option>
                                            <option value="--out">out</option>
                                            <option value="--archive">archive</option>
                                            <option value="--repair">repair</option>
                                            <option value="--oplog">oplog</option>
                                            <option value="--dumpDbUsersAndRoles">dumpDbUsersAndRoles
                                            </option>
                                            <option value="--excludeCollection">excludeCollection</option>
                                            <option value="--excludeCollectionsWithPrefix">
                                                excludeCollectionsWithPrefix
                                            </option>
                                            <option value="--numParallelCollections">
                                                numParallelCollections
                                            </option>
                                            <option value="--viewsAsCollections">viewsAsCollections</option>

                                        </select>
                                    </div>
                                </div>

                                {{> mongodumpOptions}}

                                <div class="form-group">
                                    <div id="mongodump">
                                        <label class="col-lg-2 control-label">{{_ "logs"}}</label>
                                        <div class="col-lg-10">
                                            <textarea id="txtMongodumpLogs" class="form-control"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>

                        <div class="ibox-footer">
                            <div class="row">
                                <div class="col-lg-12">
                                    <button id="btnExecuteMongodump"
                                            class="btn btn-block btn-outline btn-primary ladda-button"
                                            type="button"
                                            data-style="contract">
                                        <strong>{{_ "execute"}}</strong></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-lg-6">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>Mongorestore</h5>

                            <div class="ibox-tools">
                                <a id="btnClearMongorestoreLogs" href="#" title="{{_ "delete_logs"}}">
                                    <i class="fa fa-trash"></i>
                                </a>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <form method="get" class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-lg-2 control-label">{{_ "arguments"}}</label>
                                    <div class="col-lg-10">
                                        <select id="cmbMongorestoreArgs"
                                                data-placeholder="{{_ "select_options"}}"
                                                multiple="true"
                                                class="chosen-select form-control"
                                                tabindex="-1">
                                            <option value="-v">verbose</option>
                                            <option value="--quiet">quiet</option>
                                            <option value="--host">host</option>
                                            <option value="--port">port</option>
                                            <option value="--ssl">ssl</option>
                                            <option value="--sslCAFile">sslCAFile</option>
                                            <option value="--sslPEMKeyFile">sslPEMKeyFile</option>
                                            <option value="--sslPEMKeyPassword">sslPEMKeyPassword</option>
                                            <option value="--sslCRLFile">sslCRLFile</option>
                                            <option value="--sslAllowInvalidCertificates">
                                                sslAllowInvalidCertificates
                                            </option>
                                            <option value="--sslAllowInvalidHostnames">
                                                sslAllowInvalidHostnames
                                            </option>
                                            <option value="--sslFIPSMode">sslFIPSMode</option>
                                            <option value="--username">username</option>
                                            <option value="--password">password</option>
                                            <option value="--authenticationDatabase">
                                                authenticationDatabase
                                            </option>
                                            <option value="--authenticationMechanism">
                                                authenticationMechanism
                                            </option>
                                            <option value="--gssapiServiceName">gssapiServiceName</option>
                                            <option value="--gssapiHostName">gssapiHostName</option>
                                            <option value="--db">db</option>
                                            <option value="--collection">collection</option>
                                            <option value="--nsExclude">nsExclude</option>
                                            <option value="--nsInclude">nsInclude</option>
                                            <option value="--nsFrom">nsFrom</option>
                                            <option value="--nsTo">nsTo</option>
                                            <option value="--objcheck">objcheck</option>
                                            <option value="--drop">drop</option>
                                            <option value="--dryRun">dryRun</option>
                                            <option value="--oplogReplay">oplogReplay</option>
                                            <option value="--oplogLimit">oplogLimit</option>
                                            <option value="--oplogFile">oplogFile</option>
                                            <option value="--keepIndexVersion">keepIndexVersion</option>
                                            <option value="--noIndexRestore">noIndexRestore</option>
                                            <option value="--noOptionsRestore">noOptionsRestore</option>
                                            <option value="--restoreDbUsersAndRoles">restoreDbUsersAndRoles</option>
                                            <option value="--writeConcern">writeConcern</option>
                                            <option value="--maintainInsertionOrder">maintainInsertionOrder</option>
                                            <option value="--numParallelCollections">numParallelCollections</option>
                                            <option value="--numInsertionWorkersPerCollection">
                                                numInsertionWorkersPerCollection
                                            </option>
                                            <option value="--stopOnError">stopOnError</option>
                                            <option value="--bypassDocumentValidation">bypassDocumentValidation</option>
                                            <option value="--gzip">gzip</option>
                                            <option value="--archive">archive</option>
                                            <option value="--dir">dir</option>

                                        </select>
                                    </div>
                                </div>

                                {{> mongorestoreOptions}}

                                <div class="form-group">
                                    <div id="mongorestore">
                                        <label class="col-lg-2 control-label">{{_ "logs"}}</label>
                                        <div class="col-lg-10">
                                            <textarea id="txtMongorestoreLogs" class="form-control"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>

                        <div class="ibox-footer">
                            <div class="row">
                                <div class="col-lg-12">
                                    <button id="btnExecuteMongorestore"
                                            class="btn btn-block btn-outline btn-primary ladda-button"
                                            type="button"
                                            data-style="contract">
                                        <strong>{{_ "execute"}}</strong></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-lg-6">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>Mongoexport</h5>

                            <div class="ibox-tools">
                                <a id="btnClearMongoexportLogs" href="#" title="{{_ "delete_logs"}}">
                                    <i class="fa fa-trash"></i>
                                </a>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <form method="get" class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-lg-2 control-label">{{_ "arguments"}}</label>
                                    <div class="col-lg-10">
                                        <select id="cmbMongoexportArgs"
                                                data-placeholder="{{_ "select_options"}}"
                                                multiple="true"
                                                class="chosen-select form-control"
                                                tabindex="-1">
                                            <option value="-v">verbose</option>
                                            <option value="--quiet">quiet</option>
                                            <option value="--host">host</option>
                                            <option value="--port">port</option>
                                            <option value="--ipv6">ipv6</option>
                                            <option value="--ssl">ssl</option>
                                            <option value="--sslCAFile">sslCAFile</option>
                                            <option value="--sslPEMKeyFile">sslPEMKeyFile</option>
                                            <option value="--sslPEMKeyPassword">sslPEMKeyPassword</option>
                                            <option value="--sslCRLFile">sslCRLFile</option>
                                            <option value="--sslAllowInvalidCertificates">
                                                sslAllowInvalidCertificates
                                            </option>
                                            <option value="--sslAllowInvalidHostnames">
                                                sslAllowInvalidHostnames
                                            </option>
                                            <option value="--sslFIPSMode">sslFIPSMode</option>
                                            <option value="--username">username</option>
                                            <option value="--password">password</option>
                                            <option value="--authenticationDatabase">
                                                authenticationDatabase
                                            </option>
                                            <option value="--authenticationMechanism">
                                                authenticationMechanism
                                            </option>
                                            <option value="--gssapiServiceName">gssapiServiceName</option>
                                            <option value="--gssapiHostName">gssapiHostName</option>
                                            <option value="--db">db</option>
                                            <option value="--collection">collection</option>
                                            <option value="--fields">fields</option>
                                            <option value="--fieldFile">fieldFile</option>
                                            <option value="--query">query</option>
                                            <option value="--type">type</option>
                                            <option value="--out">out</option>
                                            <option value="--jsonArray">jsonArray</option>
                                            <option value="--pretty">pretty</option>
                                            <option value="--slaveOk">slaveOk</option>
                                            <option value="--readPreference">readPreference</option>
                                            <option value="--forceTableScan">forceTableScan</option>
                                            <option value="--skip">skip</option>
                                            <option value="--limit">limit</option>
                                            <option value="--sort">sort</option>
                                        </select>
                                    </div>
                                </div>

                                {{> mongoexportOptions}}

                                <div class="form-group">
                                    <div id="mongoexport">
                                        <label class="col-lg-2 control-label">{{_ "logs"}}</label>
                                        <div class="col-lg-10">
                                            <textarea id="txtMongoexportLogs" class="form-control"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>

                        <div class="ibox-footer">
                            <div class="row">
                                <div class="col-lg-12">
                                    <button id="btnExecuteMongoexport"
                                            class="btn btn-block btn-outline btn-primary ladda-button"
                                            type="button"
                                            data-style="contract">
                                        <strong>{{_ "execute"}}</strong></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-lg-6">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>Mongoimport</h5>

                            <div class="ibox-tools">
                                <a id="btnClearMongoimportLogs" href="#" title="{{_ "delete_logs"}}">
                                    <i class="fa fa-trash"></i>
                                </a>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <form method="get" class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-lg-2 control-label">{{_ "arguments"}}</label>
                                    <div class="col-lg-10">
                                        <select id="cmbMongoimportArgs"
                                                data-placeholder="{{_ "select_options"}}"
                                                multiple="true"
                                                class="chosen-select form-control"
                                                tabindex="-1">
                                            <option value="-v">verbose</option>
                                            <option value="--quiet">quiet</option>
                                            <option value="--host">host</option>
                                            <option value="--port">port</option>
                                            <option value="--ipv6">ipv6</option>
                                            <option value="--ssl">ssl</option>
                                            <option value="--sslCAFile">sslCAFile</option>
                                            <option value="--sslPEMKeyFile">sslPEMKeyFile</option>
                                            <option value="--sslPEMKeyPassword">sslPEMKeyPassword</option>
                                            <option value="--sslCRLFile">sslCRLFile</option>
                                            <option value="--sslAllowInvalidCertificates">
                                                sslAllowInvalidCertificates
                                            </option>
                                            <option value="--sslAllowInvalidHostnames">
                                                sslAllowInvalidHostnames
                                            </option>
                                            <option value="--sslFIPSMode">sslFIPSMode</option>
                                            <option value="--username">username</option>
                                            <option value="--password">password</option>
                                            <option value="--authenticationDatabase">
                                                authenticationDatabase
                                            </option>
                                            <option value="--authenticationMechanism">
                                                authenticationMechanism
                                            </option>
                                            <option value="--gssapiServiceName">gssapiServiceName</option>
                                            <option value="--gssapiHostName">gssapiHostName</option>
                                            <option value="--db">db</option>
                                            <option value="--collection">collection</option>
                                            <option value="--fields">fields</option>
                                            <option value="--fieldFile">fieldFile</option>
                                            <option value="--ignoreBlanks">ignoreBlanks</option>
                                            <option value="--type">type</option>
                                            <option value="--file">file</option>
                                            <option value="--drop">drop</option>
                                            <option value="--headerline">headerline</option>
                                            <option value="--mode">mode</option>
                                            <option value="--upsertFields">upsertFields</option>
                                            <option value="--stopOnError">stopOnError</option>
                                            <option value="--jsonArray">jsonArray</option>
                                            <option value="--maintainInsertionOrder">maintainInsertionOrder</option>
                                            <option value="--numInsertionWorkers">numInsertionWorkers</option>
                                            <option value="--writeConcern">writeConcern</option>
                                            <option value="--bypassDocumentValidation">bypassDocumentValidation</option>
                                            <option value="--columnsHaveTypes">columnsHaveTypes</option>
                                            <option value="--parseGrace">parseGrace</option>
                                        </select>
                                    </div>
                                </div>

                                {{> mongoimportOptions}}

                                <div class="form-group">
                                    <div id="mongoimport">
                                        <label class="col-lg-2 control-label">{{_ "logs"}}</label>
                                        <div class="col-lg-10">
                                            <textarea id="txtMongoimportLogs" class="form-control"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>

                        <div class="ibox-footer">
                            <div class="row">
                                <div class="col-lg-12">
                                    <button id="btnExecuteMongoimport"
                                            class="btn btn-block btn-outline btn-primary ladda-button"
                                            type="button"
                                            data-style="contract">
                                        <strong>{{_ "execute"}}</strong></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    {{/if}}
</template>